% do not consider alice in coalitions
drawcoalition(SET) :- not(member(al,SET)).

% specify iois
ioi(id_1,'1').
ioi(id_2,'2').
ioi(id_3,'3').
ioi(id_4,'4').
ioi(id_5,'5').
ioi(id_6,'6').
ioi(id_71,'7').
ioi(id_72,'8').
ioi(invbs,'b').
ioi(invii,'i').
ioi(invis,'s').

% involvement properties

involvement(A,D,P,CX) :-
  detect(A,ctxm(D,P,_,I,_)),ioi(I,_),
  D\=dot,
  link(A,LST),
  member(CX,LST),
  member(ctx(D,_),LST).

customprop(A,ctxm(D,P,invsp,invbs,cinvbs)) :- involvement(A,D,P,ctx(dot,bs)).
customprop(A,ctxm(D,P,invidp1,invii,cinvii)) :- involvement(A,D,P,ctx(dot,ii)).
customprop(A,ctxm(D,P,invidp2,invis,cinvis)) :- involvement(A,D,P,ctx(dot,is)).

